#!/usr/bin/env python
#coding:utf-8
from min_p import *
reload(sys)
sys.setdefaultencoding("utf-8")

from selenium import webdriver  
from taobao_db import TB_DB

chromedriver = "chromedriver.exe"
#chrome_options = webdriver.ChromeOptions()
#prefs = {"profile.managed_default_content_settings.images":2}
#chrome_options.add_experimental_option("prefs",prefs)


driver = webdriver.Chrome(executable_path=chromedriver)#,chrome_options=chrome_options)

driver.set_window_size(1280,800)
driver.get("http://127.0.0.1/tb1.php")

try:
	buttons = driver.find_elements_by_tag_name("button")#.get_attribute('disabled')
	for button in buttons:
		if "下一页" in button.text:
			print button.text+" ",button.get_attribute('disabled')
except Exception, e:
	print e


driver.quit()

